<template>
  <!-- 质量报告模版记录2.0表单弹窗 -->
  <div>
    <el-dialog
      v-model="visibleDialog"
      :title="props.title"
      width="1000px"
      draggable
      @close="closeDialog"
    >
      <el-form
        ref="formRef"
        :model="formData"
        :inline="true"
        :rules="rules"
        label-width="160"
      >
        <h4 class="mb-[20px] mt-[0px]">生产信息</h4>
        <div v-if="!isReadonly">
          <el-row>
            <el-col :span="12">
              <el-form-item label="客户" prop="customerId" style="width: 100%">
                <el-select
                  v-model="formData.customerId"
                  placeholder="请选择客户"
                  @change="partnerChange"
                  style="width: 70%"
                  clearable
                >
                  <el-option
                    v-for="item in customerList"
                    :key="`${item.id}`"
                    :label="`${item.partnerName}`"
                    :value="`${item.id}`"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item
                label="生产日期"
                prop="produceDate"
                style="width: 100%"
              >
                <el-date-picker
                  v-model="formData.produceDate"
                  type="date"
                  style="width: 70%"
                  value-format="YYYY-MM-DD"
                  placeholder="请输入生产日期"
                  @change="handleproduceDate"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="产品" prop="materialId" style="width: 100%">
                <el-select
                  v-model="formData.materialId"
                  placeholder="请选择产品"
                  clearable
                  style="width: 70%"
                  @change="materialChange"
                  filterable
                >
                  <el-option
                    v-for="item in materialList"
                    :key="`${item.materialId}`"
                    :label="`${item.materialName}`"
                    :value="`${item.materialId}`"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item
                label="图号"
                prop="materialDrawingNo"
                style="width: 100%"
              >
                <el-input
                  v-if="!props.isReadonly"
                  v-model="formData.materialDrawingNo"
                  disabled
                  style="width: 70%"
                  placeholder="请输入图号"
                  clearable
                />
                <span v-else>{{ formData.materialDrawingNo }}</span>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item
                label="批号"
                prop="materialBatch"
                style="width: 100%"
              >
                <el-select
                  v-model="formData.materialBatch"
                  placeholder="请选择批号"
                  clearable
                  style="width: 70%"
                  filterable
                >
                  <el-option
                    v-for="item in batchList"
                    :key="`${item.plannedBatch}`"
                    :label="`${item.plannedBatch}`"
                    :value="`${item.plannedBatch}`"
                  />
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
        </div>
        <el-descriptions
          v-if="props.isReadonly"
          class="margin-top"
          :column="2"
          size="large"
          border
        >
          <el-descriptions-item label="客户">
            {{ formData.customerName }}
          </el-descriptions-item>
          <el-descriptions-item label="生产日期">
            {{ dayjs(formData.produceDate).format("YYYY-MM-DD") }}
          </el-descriptions-item>
          <el-descriptions-item label="产品">
            {{ formData.materialName }}
          </el-descriptions-item>
          <el-descriptions-item label="图号">
            {{ formData.materialDrawingNo }}
          </el-descriptions-item>
          <el-descriptions-item label="批号">
            {{ formData.materialBatch }}
          </el-descriptions-item>
        </el-descriptions>
        <h4 class="mb-[20px] mt-[0px]">模版信息</h4>
        <div v-if="!isReadonly">
          <el-row>
            <el-col :span="12">
              <el-form-item
                label="报告类型"
                prop="reportCategory"
                style="width: 100%"
              >
                <el-select
                  v-model="formData.reportCategory"
                  placeholder="请选择报告类别"
                  clearable
                  style="width: 70%"
                  @change="reportCategoryChange"
                >
                  <el-option
                    v-for="item in useDictionary('QmsReportType')"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="模版" prop="configId" style="width: 100%">
                <el-select
                  v-model="formData.configId"
                  placeholder="请选择模版"
                  clearable
                  style="width: 70%"
                  @change="configChange"
                  filterable
                >
                  <el-option
                    v-for="item in configList"
                    :key="`${item.id}`"
                    :label="`${item.templateName}`"
                    :value="`${item.id}`"
                  />
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
        </div>
        <el-descriptions
          v-if="props.isReadonly"
          class="margin-top"
          :column="2"
          size="large"
          border
        >
          <el-descriptions-item label="报告类型">
            {{ useDictionary("QmsReportType", formData.reportCategory) }}
          </el-descriptions-item>
          <el-descriptions-item label="模版">
            {{ formData.configName }}
          </el-descriptions-item>
        </el-descriptions>
        <h4 class="mb-[20px] mt-[20px]">检验结果</h4>
        <el-card shadow="never" class="table-container">
          <template #header>
<!--            <el-button style="float: right" plain @click="previewTheReport"-->
<!--              >预览报告</el-button-->
<!--            >-->
          </template>
          <div class="formTable">
            <el-table
              :data="formData.details"
              style="width: 100%"
              :key="Math.random"
              border
            >
              <el-table-column
                type="index"
                label="序号"
                align="center"
                width="100"
              />
              <el-table-column
                label="检验项目"
                props="checkItemId"
                min-width="150"
              >
                <template #default="{ $index, row }">
                  {{ row.checkItemCode }} - {{ row.checkItemName }}
                </template>
              </el-table-column>
              <el-table-column
                label="预检单"
                props="checkDocId"
                min-width="150"
              >
                <template #default="{ $index, row }">
                  <el-form-item
                    v-if="!isReadonly"
                    :prop="'details.' + $index + '.preDocId'"
                    :rules="rules.sonpreDocId"
                    label-width="0"
                  >
                    <el-input
                      v-model="row.effectPreCheckCode"
                      placeholder="请选择预检单"
                      disabled
                      clearable
                      readonly
                      @click="showPreSelect(row)"
                    >
                      <template #append>
                        <el-button
                          type="success"
                          plain
                          @click="showPreSelect(row)"
                          >选择</el-button
                        >
                      </template>
                    </el-input>
                  </el-form-item>
                  <span v-else>{{ row.effectPreCheckCode }}</span>
                </template>
              </el-table-column>
              <el-table-column
                label="检验单"
                props="checkDocId"
                min-width="150"
              >
                <template #default="{ $index, row }">
                  <el-form-item
                    v-if="!isReadonly"
                    :prop="'details.' + $index + '.checkDocId'"
                    :rules="rules.soncheckDocId"
                    label-width="0"
                  >
                    <el-input
                      v-model="row.effectCheckCode"
                      placeholder="请选择检验单"
                      disabled
                      clearable
                      readonly
                      @click="showCheckDocSelect(row)"
                    >
                      <template #append>
                        <el-button
                          type="success"
                          plain
                          @click="showCheckDocSelect(row)"
                          >选择</el-button
                        >
                      </template>
                    </el-input>
                  </el-form-item>
                  <span v-else>{{ row.effectCheckCode }}</span>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </el-card>
        <el-row v-if="!isReadonly" class="mt-[20px]">
          <el-col :span="10" :offset="4">
            <el-form-item
              label="报告日期"
              prop="reportDate"
              style="width: 100%"
            >
              <el-date-picker
                v-model="formData.reportDate"
                type="date"
                style="width: 70%"
                value-format="YYYY-MM-DD"
                placeholder="请输入报告日期"
              />
            </el-form-item>
          </el-col>
          <el-col :span="10">
            <el-form-item
              label="报告人"
              prop="reportUserId"
              style="width: 100%"
            >
              <el-select
                style="width: 100%"
                v-if="!props.isReadonly"
                v-model="formData.reportUserId"
                placeholder="请选择报告人"
                clearable
                @change="changePerson"
                filterable
              >
                <el-option
                  v-for="item in personList"
                  :label="`${item.firstName}`"
                  :value="`${item.id}`"
                />
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-descriptions
          v-if="props.isReadonly"
          class="margin-top"
          :column="2"
          size="large"
          border
        >
          <el-descriptions-item label="报告日期">
            {{ dayjs(formData.reportDate).format("YYYY-MM-DD") }}
          </el-descriptions-item>
          <el-descriptions-item label="报告人">
            {{ formData.reportUserName }}
          </el-descriptions-item>
        </el-descriptions>
      </el-form>

      <template #footer>
        <div class="dialog-footer">
          <el-button
            v-if="!props.isReadonly"
            type="primary"
            :loading="loading"
            @click="handleSubmit"
            >确 定</el-button
          >
          <el-button @click="closeDialog">取 消</el-button>
        </div>
      </template>
    </el-dialog>

    <pre-select
      :visible="selectPreDialogSELECT.visible"
      @change-visible="changePreVisibleSELECT"
      :checkItemId="selectedCheckItemId"
      :brekList="brekPreList"
    />

    <check-select
      :visible="selectCheckDocDialogSELECT.visible"
      @change-visible="changeCheckDocVisibleSELECT"
      :epCheckPreId="selectedPreId"
      :brekList="brekCheckDocList"
    />
  </div>
</template>

<script setup lang="ts">
import request from "@/utils/request";
import { useDictStoreHook } from "@/store/modules/dictionary";
import { ref } from "vue";
import { useDictionary } from "@/utils/useTable";
import dayjs from "dayjs";
import { useReportModelConfigStore } from "@/views/qms/pinia/ReportModelConfigStore";
import { useRouter } from "vue-router"; // 引入
const router = useRouter();
const dictionaryStore = useDictStoreHook();

defineOptions({
  name: "QMSQMSREPORTMODELRECORDADDORUPDATE",
  inheritAttrs: false,
});

const emit = defineEmits(["reset-table", "change-visible"]);

const props = defineProps({
  visible: {
    type: Boolean,
    default: () => {
      return false;
    },
  },
  title: {
    type: String,
    default: () => {
      return "";
    },
  },
  data: {
    type: Object,
    default: () => {
      return {};
    },
  },
  isReadonly: {
    type: Boolean,
    default: () => {
      return false;
    },
  },
});

/** 弹窗显示 **/
const visibleDialog = ref(false);
watch(
  () => props.visible,
  (newVal: boolean) => {
    visibleDialog.value = newVal;
    if (newVal) {
      getCustomer();
      getCheckTypeList();
      getPersonList();
    }
    setTimeout(() => {
      formRef.value.clearValidate();
    }, 50);
  }
);

/** formData定义表单数据 */
const formRef = ref(ElForm);
let formData = reactive({
  id: "",
  version: "",
  configId: "",
  configName: "",
  customerId: "",
  customerName: "",
  checkPreId: "",
  docPreId: "",
  materialBatch: "",
  materialId: "",
  materialCode: "",
  materialName: "",
  materialDrawingNo: "",
  materialQuality: "",
  produceDate: "",
  reportCategory: "",
  reportDate: "",
  reportUserId: "",
  reportUserName: "",
  deviceType: "",
  reportTemplateId: "",
  approveStatus: "",
  approveUserId: "",
  approveUserName: "",
  approveDate: "",
  remarks: "",
  createTime: "",
  createdUserId: "",
  createdUserName: "",
  lastUpdateTime: "",
  lastUpdatedUserId: "",
  lastUpdatedUserName: "",
  enabled: "",
  deleted: "",
  details: [],
});

/** rules规则 */
const rules = reactive({
  configId: [
    { required: true, message: "请选择模板", trigger: "blur" },
    { min: 1, max: 32, message: "长度在 1 到 32 个字符", trigger: "blur" },
  ],
  configName: [
    { min: 1, max: 200, message: "长度在 1 到 200 个字符", trigger: "blur" },
  ],
  customerId: [
    { required: true, message: "请选择客户", trigger: "blur" },
    { min: 1, max: 32, message: "长度在 1 到 32 个字符", trigger: "blur" },
  ],
  customerName: [
    { min: 1, max: 50, message: "长度在 1 到 50 个字符", trigger: "blur" },
  ],
  materialBatch: [
    { required: true, message: "请选择批号", trigger: "blur" },
    { min: 1, max: 32, message: "长度在 1 到 32 个字符", trigger: "blur" },
  ],
  materialId: [
    { required: true, message: "请选择产品", trigger: "blur" },
    { min: 1, max: 32, message: "长度在 1 到 32 个字符", trigger: "blur" },
  ],
  materialCode: [
    { min: 1, max: 50, message: "长度在 1 到 50 个字符", trigger: "blur" },
  ],
  materialName: [
    { min: 1, max: 50, message: "长度在 1 到 50 个字符", trigger: "blur" },
  ],
  materialDrawingNo: [
    { min: 1, max: 50, message: "长度在 1 到 50 个字符", trigger: "blur" },
  ],
  materialQuality: [
    { min: 1, max: 50, message: "长度在 1 到 50 个字符", trigger: "blur" },
  ],
  reportCategory: [
    { required: true, message: "请选择报告类别", trigger: "blur" },
    { min: 1, max: 32, message: "长度在 1 到 32 个字符", trigger: "blur" },
  ],
  produceDate: [{ required: true, message: "请选择生产日期", trigger: "blur" }],
  reportDate: [{ required: true, message: "请选择报告日期", trigger: "blur" }],
  reportUserId: [{ required: true, message: "请选择报告人", trigger: "blur" }],
  reportUserName: [],
  deviceType: [
    { min: 1, max: 50, message: "长度在 1 到 50 个字符", trigger: "blur" },
  ],
  reportTemplateId: [
    { min: 1, max: 32, message: "长度在 1 到 32 个字符", trigger: "blur" },
  ],
  approveStatus: [
    { min: 1, max: 32, message: "长度在 1 到 32 个字符", trigger: "blur" },
  ],
  approveUserId: [
    { min: 1, max: 32, message: "长度在 1 到 32 个字符", trigger: "blur" },
  ],
  approveUserName: [
    { min: 1, max: 32, message: "长度在 1 到 32 个字符", trigger: "blur" },
  ],
  approveDate: [],
  remarks: [
    { min: 1, max: 255, message: "长度在 1 到 255 个字符", trigger: "blur" },
  ],
  createTime: [],
  createdUserId: [
    { min: 1, max: 32, message: "长度在 1 到 32 个字符", trigger: "blur" },
  ],
  createdUserName: [
    { min: 1, max: 50, message: "长度在 1 到 50 个字符", trigger: "blur" },
  ],
  lastUpdateTime: [],
  lastUpdatedUserId: [
    { min: 1, max: 32, message: "长度在 1 到 32 个字符", trigger: "blur" },
  ],
  lastUpdatedUserName: [
    { min: 1, max: 50, message: "长度在 1 到 50 个字符", trigger: "blur" },
  ],
  enabled: [],
  deleted: [],
  sonrecordId: [
    { min: 1, max: 32, message: "长度在 1 到 32 个字符", trigger: "blur" },
  ],
  sonpreDocId: [
    { required: true, message: "请选择预检单", trigger: "blur" },
    { min: 1, max: 32, message: "长度在 1 到 32 个字符", trigger: "blur" },
  ],
  soncheckDocId: [
    { required: true, message: "请选择检验单", trigger: "blur" },
    { min: 1, max: 32, message: "长度在 1 到 32 个字符", trigger: "blur" },
  ],
});

const isValidated = ref(false);

const details = {
  id: "",
  recordId: "",
  checkItemId: "",
  preDocId: "",
  preDocNo: "",
  checkDocId: "",
  checkDocNo: "",
  version: "",
  remarks: "",
  createTime: "",
  createdUserId: "",
  createdUserName: "",
  lastUpdateTime: "",
  lastUpdatedUserId: "",
  lastUpdatedUserName: "",
  enabled: "",
  deleted: "",
};

/** 编辑时赋值 */
watch(
  () => props.data,
  (newVal: any) => {
    formData.id = "";
    if (newVal?.id) {
      Object.assign(formData, props.data);
      if (formData.id) {
        getdetails();
        getMaterials();
        getBatch();
        getReportConfigList();
      }
    }
  }
);

/** 关闭表单弹窗 */
function closeDialog() {
  visibleDialog.value = false;
  emit("change-visible", false);
  resetForm();
}

/** 重置表单 */
function resetForm() {
  formRef.value.resetFields();
  formRef.value.clearValidate();
  formData.details = [];
  formData.id = "";
  formData.version = "";
  formData.configId = "";
  formData.configName = "";
  formData.customerId = "";
  formData.customerName = "";
  formData.checkPreId = "";
  formData.docPreId = "";
  formData.materialBatch = "";
  formData.materialId = "";
  formData.materialCode = "";
  formData.materialName = "";
  formData.materialDrawingNo = "";
  formData.materialQuality = "";
  formData.produceDate = "";
  formData.reportCategory = "";
  formData.reportDate = "";
  formData.reportUserId = "";
  formData.reportUserName = "";
  formData.deviceType = "";
  formData.reportTemplateId = "";
  formData.approveStatus = "";
  formData.approveUserId = "";
  formData.approveUserName = "";
  formData.approveDate = "";
  formData.remarks = "";
  formData.createTime = "";
  formData.createdUserId = "";
  formData.createdUserName = "";
  formData.lastUpdateTime = "";
  formData.lastUpdatedUserId = "";
  formData.lastUpdatedUserName = "";
  formData.enabled = "";
  formData.deleted = "";
  materialList.value = [];
  batchList.value = [];
  configList.value = [];
}

const loading = ref(false);

/** 质量报告模版记录2.0保存提交 */
function handleSubmit() {
  formRef.value.validate(async (valid: any) => {
    if (valid) {
      loading.value = true;
      const text = formData.id ? "编辑" : "新增";
      console.log("formData", toRaw(formData));
      await request({
        url: "/qms/qmsreportmodelrecord/save",
        method: "post",
        data: formData,
      }).finally(() => {
        loading.value = false;
      });
      ElMessage.success(text + `成功`);
      closeDialog();
      emit("reset-table", formData.id);
      isValidated.value = false;
    } else {
      isValidated.value = true;
    }
  });
}

async function getdetails() {
  let sondetails = await request({
    url: "/qms/qmsreportmodelrecord/getDetails",
    method: "post",
    data: formData,
  }).finally(() => {
    loading.value = false;
  });
  formData.details = sondetails.data;
}

const customerList = ref([]);
const getCustomer = async () => {
  const { data } = await request({
    url: "mdm/mdmpartner/getList",
    method: "get",
    data: {},
  });
  customerList.value = data;
};

const partnerChange = () => {
  if (formData.customerId) {
    formData.customerName = customerList.value.find(
      (item) => item.id === formData.customerId
    )?.partnerName;
  } else {
    materialList.value = [];
  }
  handleGetMaterials();
};

const handleproduceDate = () => {
  handleGetMaterials();
};

const handleGetMaterials = () => {
  formData.materialId = "";
  materialChange();
  getMaterials();
};

const materialList = ref([]);
const getMaterials = async () => {
  if (!formData.customerId || !formData.produceDate) {
    materialList.value = [];
    return;
  }
  const { data: partnerMaterialList } = await request({
    url: `mdm/partnerproduct/materialList/${formData.customerId}`,
    method: "get",
    data: {},
  });
  const materialIds = partnerMaterialList.map((item) => item.materialId);

  const { data } = await request({
    url: "mes/mesplanworkingform/getMaterialListByMaterialAndPlanDate",
    method: "post",
    data: { materialIds, planActualDate: formData.produceDate },
  });
  materialList.value = data;
};

const materialChange = () => {
  const find = materialList.value.find(
    (item) => item.materialId === formData.materialId
  );
  formData.materialDrawingNo = find?.figureNumber;
  formData.materialCode = find?.materialCode;
  formData.materialName = find?.materialName;
  if (formData.materialId) {
    handleGetBatch();
    handleGetReportConfig();
  } else {
    batchList.value = [];
    configList.value = [];
  }
  configChange();
};

const handleGetReportConfig = () => {
  formData.configId = "";
  getReportConfigList();
};

const handleGetBatch = () => {
  formData.materialBatch = "";
  getBatch();
};

const batchList = ref([]);
const getBatch = async () => {
  const { data } = await request({
    url: `mes/mesplanworkingform/getBatchListByMaterialAndPlanDate`,
    method: "post",
    data: {},
  });
  batchList.value = data;
};

const checkTypeList = ref([]);
const getCheckTypeList = async () => {
  const { data } = await request({
    url: `qms/qmschecktype/getList`,
    method: "post",
    data: {},
  });
  checkTypeList.value = data;
};

const reportCategoryChange = () => {
  if (formData.materialId) handleGetReportConfig();
  else configList.value = [];
  configChange();
};

const configList = ref([]);
const getReportConfigList = async () => {
  const { data } = await request({
    url: `qms/qmsreportmodelconfig/getList`,
    method: "post",
    data: {
      reportCategory: formData.reportCategory,
      materialId: formData.materialId,
    },
  });
  configList.value = data;
};

const configChange = async () => {
  if (formData.configId) {
    const find = configList.value.find((item) => item.id === formData.configId);
    formData.reportCategory = find?.reportCategory;
    formData.configName = find?.templateName;
    formData.reportTemplateId = find?.reportTemplateId;
    const { data } = await request({
      url: `qms/qmsreportmodelconfig/getDetails`,
      method: "post",
      data: { id: formData.configId },
    });
    formData.details = data.map(
      ({ checkItemId, checkItemCode, checkItemName }) => ({
        checkItemId,
        checkItemCode,
        checkItemName,
      })
    );
  } else {
    formData.details = [];
  }
};

const selectRow = ref();

// 回显的数据
const brekPreList = ref([]);
const selectedCheckItemId = ref(null);
const showPreSelect = (row) => {
  selectPreDialogSELECT.value.visible = true;
  selectRow.value = row;
  selectedCheckItemId.value = row.checkItemId;
};
//选择物料弹窗
const selectPreDialogSELECT = ref({
  visible: false,
});
const changePreVisibleSELECT = (val: boolean, data: any) => {
  selectPreDialogSELECT.value.visible = val;
  if (data) {
    if (data.id !== selectRow.value.preDocId) {
      selectRow.value.preDocId = data.id;
      selectRow.value.effectPreCheckCode = data.effectPreCheckCode;
      selectRow.value.checkDocId = null;
      selectRow.value.checkDocNo = null;
    }
  }
  selectRow.value = null;
  selectedCheckItemId.value = null;
};
// 回显的数据
const brekCheckDocList = ref([]);
const selectedPreId = ref(null);
const showCheckDocSelect = (row) => {
  if (!row.preDocId) {
    return ElMessage.warning("请先选择预检单");
  }
  selectCheckDocDialogSELECT.value.visible = true;
  selectRow.value = row;
  selectedPreId.value = row.preDocId;
};
//选择物料弹窗
const selectCheckDocDialogSELECT = ref({
  visible: false,
});
const changeCheckDocVisibleSELECT = (val: boolean, data: any) => {
  selectCheckDocDialogSELECT.value.visible = val;
  if (data) {
    selectRow.value.checkDocId = data.id;
    selectRow.value.effectCheckCode = data.effectCheckCode;
  }
  selectRow.value = null;
  selectedPreId.value = null;
};

const personList = ref([]);
const getPersonList = async () => {
  const res = await request({
    url: "/system/sysUser/getList",
    method: "post",
    data: {},
  });
  personList.value = res.data;
};

const changePerson = () => {
  const find = personList.value.find(
    (item) => item.id === formData.reportUserId
  );
  formData.reportUserName = find?.firstName;
};

const previewTheReport = async () => {
  if (!formData.configId) {
    return ElMessage.warning(`请选择报告模版`);
  }
  const { data: configData } = await request({
    url: `qms/qmsreportmodelconfig/get/${formData.configId}`,
    method: "get",
  });
  // 将数据存入 store
  const store = useReportModelConfigStore();
  const { details, ...other } = formData;
  const parse = { ...other };
  parse.images = configData.images;
  const { data: reportData } = await request({
    url: `qms/qmsreportmodelrecord/report/query`,
    method: "post",
    data: details.map((item) => item.checkDocId),
  });
  parse.reportDetails = reportData;
  store.setPreviewData(parse);

  const { data } = await request({
    url: `qms/qmsreporttemplate/get/${formData.reportTemplateId}`,
    method: "get",
  });
  const to = {
    path: data.templateRoute,
  };
  router.push(to);
};
</script>

<style lang="scss" scoped>
h4 {
  font-weight: 400;
  color: #000;
  padding-left: 10px;
  font-size: 14px;
  line-height: 14px;
}
.formTable {
  :deep(.el-form-item) {
    margin-right: 0 !important;
  }
}
:deep(.el-dialog .el-dialog__body) {
  overflow-y: auto;
  height: 65vh;
}
:deep(.search-container .el-input.el-input--default.el-input--suffix) {
  // 固定宽度
  width: 190px !important;
}
:deep(.search-container .el-form-item--default .el-form-item__label) {
  // 固定宽度
  justify-content: end;
}
</style>
